define(["drawable"], function(Drawable){
        
    Block.prototype = new Drawable();
    
    function Block(sprite) {  
        this.sprite = sprite;    
        
        this.hitPoints = 1;
        this.score = 10;
        this.isDirty = true;
        this.isVisible = true;
        this.isUnbreakable = false;
        if(sprite !== null){
            this.init(this.sprite.width, this.sprite.height);        
        }
        
    }
        
    Block.prototype.collides = function(collisionObject) {                
       /* define collision behaviour */
    };
    
    Block.prototype.draw = function(context){
        
        this.isCollidable = this.isVisible;
        if(this.isDirty){
            this.isDirty=false;   
            
            context.clearRect(this.x, this.y, this.w, this.h);
                                    
            if(this.isVisible && this.sprite !== null){           
                context.drawImage(this.sprite, this.x, this.y );                
            }            
        }
    };    
    
    return Block;
});